set nocompatible "do not support/compatible vi
set backspace=indent,eol,start

"------------------
"plugin config
"-------------------
call plug#begin()

Plug 'preservim/nerdtree'
Plug 'https://gitee.com/yangyangyue/syntastic.git'
Plug 'https://gitee.com/yangyangyue/YouCompleteMe.git'

call plug#end()

let mapleader=";" "set ; as leader

"NERDTree
nnoremap <leader>n :NERDTreeToggle<CR>

"syntastic
set statusline+=%#warningmsg#

set statusline+=%{SyntasticStatuslineFlag()}

set statusline+=%*


let g:syntastic_always_populate_loc_list = 1

let g:syntastic_auto_loc_list = 1

let g:syntastic_check_on_open = 1

let g:syntastic_check_on_wq = 0

nnoremap <leader>s :SyntasticCheck<CR>
nnoremap <leader>r :SyntasticReset<CR>
nnoremap <leader>i :SyntasticInfo<CR>
nnoremap <leader>m :SyntasticToggleMode<CR>
"-------------------
"syntax and indent
"-------------------
syntax on "turn on the syntax highlighting
set showmatch "show the matching brace 

filetype plugin indent on "turn on filetype detect and launch corresponding plugin/indent
set autoindent "turn on the auto intent


"-------------
"basic edit config
"-------------

se nu "set line numbers
set rnu

"-------------------
"set tab as 4 space
"-------------------
set expandtab "change tab to space,then there're no tab
set tabstop=4 "when met a tab(\t) in text,change it to 4 space
set shiftwidth=4 "set tab,s width
set softtabstop=4 "when you backspace,then delete 4 space

"tab auto complete
"set wildmode=longest,list "when there are some matchers,sort by the length as long to short
"set wildmode

"-----------------------
"key bind
"-----------------------



